package es.mllacer.qqsm.dialogs;

import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import es.mllacer.qqsm.R;

public class WinnerDialog extends DialogFragment {

	public static DialogFragment getInstance() {
		return new WinnerDialog();
	}

	@Override
	public Dialog onCreateDialog(Bundle savedInstanceState) {
		setCancelable(false);

		AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
		builder.setMessage(R.string.play_win_dialog_question);

		builder.setPositiveButton(R.string.play_win_dialog_positive,
				new OnClickListener() {
					@Override
					public void onClick(DialogInterface dialog, int which) {
						getActivity().finish();
					}
				});
		return builder.create();
	}

}
